package yf.mall.dao;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import yf.mall.entity.AppCategoryEntity;
import yf.mall.vo.AppCategoryVo;
import org.apache.ibatis.annotations.Mapper;
import com.yf.dao.BaseDao;
import java.util.List;
/**
 * 分类信息表Dao
 *
 *
 *
 * @date Tue Jul 18 14:30:26 CST 2023
 */
@Mapper
public interface AppCategoryDao extends BaseDao<AppCategoryEntity> {

    List<AppCategoryVo> findVo(AppCategoryVo vo);

    AppCategoryVo getVo(Long id);

    @Select("select * from app_category where  level = #{level}")
    List<AppCategoryEntity>  findByLevel(@Param("level") Integer level);

    @Select("select * from app_category where  type = #{type}")
    AppCategoryEntity  findByType(@Param("type") Long type);

    @Select("select * from app_category where  parent_type = #{parentType}")
    List<AppCategoryEntity>  findByParent(@Param("parentType") Long parentType);


}
